﻿@model GuRenFang.Service.Entity.Messages
@{
    Layout = null;
}
<style>
    form
    {
        margin: 0px;
    }
</style>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="modal-header">
    <a class="close" data-dismiss="modal">×</a>
    <h3>请留言</h3>
</div>
@using (Html.BeginForm("Add", "Message", FormMethod.Post,
                          new { name = "contact", id = "contact", @class = "form-horizontal" }))
{
    <div class="modal-body">
        <div class="alert alert-info">欢迎您提供宝贵意见和建议.请填写你的称呼和联系方式(比如QQ号，邮箱地址等)，以便我们和您联系！</div>

        @Html.ValidationSummary(true)
        <div class="control-group">
            <label for="name" class="control-label">你的称呼:</label>
            <div class="controls">
                @Html.TextBoxFor(model => model.SenderName, new { @class = "input-xlarge", id = "name" })
                <p class="help-inline"><span class="label label-info">昵称或姓名 @Html.ValidationMessageFor(model => model.SenderName)</span></p>
            </div>
        </div>

        <div class="control-group">
            <label for="email" class="control-label">联系方式:</label>
            <div class="controls">
                @Html.TextBoxFor(model => model.SenderEmail, new { @class = "input-xlarge", id = "email" })
                <p class="help-inline"><span class="label label-info">QQ号，邮箱地址等 @Html.ValidationMessageFor(model => model.SenderEmail)</span></p>
            </div>
        </div>
        <div class="control-group">
            <label for="subject" class="control-label">主题:<span class="label label-success">*</span></label>
            <div class="controls">
                @Html.TextBoxFor(model => model.Title, new { @class = "input-xlarge", id = "subject" })
                <p class="help-inline"><span class="label label-warning">必须填写， @Html.ValidationMessageFor(model => model.Title)</span></p>
            </div>
        </div>
        <div class="control-group">
            <label for="msg" class="control-label">内容:<span class="label label-success">*</span></label>
            <div class="controls">
                @Html.TextAreaFor(model => model.Content, new { @class = "input-xlarge", id = "msg", rows = "5" })
                <p class="help-inline"><span class="label label-warning">必须填写， @Html.ValidationMessageFor(model => model.Content)</span></p>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <a href="#" data-dismiss="modal" class="btn"><i class="icon-remove-sign"></i>关闭</a>
        <button id="submit_button" class="btn btn-info" name="submit" type="submit"><i class="icon-ok-sign"></i>确定</button>
    </div>
}
